import request from '@/utils/request'

/**
 * 活动列表
 * http://192.168.88.247:4999/web/#/80/1974
 * @param {*} data
 * @returns
 */
export function listActivity (data) {
  return request({
    url: '/api/v1/activity/list',
    method: 'post',
    data
  })
}

/**
 * 活动详情
 * http://192.168.88.247:4999/web/#/80/1973
 * @param {*} params
 * @returns
 */
export function getActivity (params) {
  return request({
    url: '/api/v1/activity/info',
    method: 'get',
    params
  })
}
/**
 * 添加活动信息
 * http://192.168.88.247:4999/web/#/80/1972
 * @param {*} data
 * @returns
 */
export function addActivity (data) {
  return request({
    url: '/api/v1/activity/add',
    method: 'post',
    data
  })
}

/**
 * 变更活动状态
 * http://192.168.88.247:4999/web/#/80/1972
 * @param {*} data
 * @returns
 */
export function changeActivity (data) {
  return request({
    url: '/api/v1/activity/process',
    method: 'post',
    data
  })
}

export function updateActivity (data) {
  return request({
    url: '/api/v1/activity/update',
    method: 'put',
    data
  })
}
